//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//

package com.restaurant.application.minifacade.data;

import com.google.common.collect.Lists;
import com.nebutown.generation.Convert;
import com.nebutown.generation.PickableBean;
import java.util.List;

public class CouponPadBO implements PickableBean {
    public static final String FN_USEDTIME = "usedTime";
    public static final String FN_NAME = "name";
    public static final String FN_NUMBER = "number";
    public static final String FN_USEDPHONE = "usedPhone";
    public static final List<String> FIELD_NAMES = Lists.newArrayList(new String[]{"usedTime", "name", "number", "usedPhone"});
    private String usedTime;
    private String name;
    private String number;
    private String usedPhone;

    public CouponPadBO(String usedTime, String name, String number, String usedPhone) {
        this.setUsedTime(usedTime);
        this.setName(name);
        this.setNumber(number);
        this.setUsedPhone(usedPhone);
    }

    public CouponPadBO() {
    }

    public CouponPadBO duplicate() {
        CouponPadBO result = new CouponPadBO();
        result.usedTime = this.usedTime;
        result.name = this.name;
        result.number = this.number;
        result.usedPhone = this.usedPhone;
        return result;
    }

    public String toString() {
        return Convert.toJson(this);
    }

    public String getUsedTime() {
        return this.usedTime;
    }

    public void setUsedTime(String value) {
        this.usedTime = value;
    }

    public CouponPadBO withUsedTime(String value) {
        this.setUsedTime(value);
        return this;
    }

    public CouponPadBO withUsedTime(String value, String defaultValue) {
        this.setUsedTime(value == null ? defaultValue : value);
        return this;
    }

    public String getName() {
        return this.name;
    }

    public void setName(String value) {
        this.name = value;
    }

    public CouponPadBO withName(String value) {
        this.setName(value);
        return this;
    }

    public CouponPadBO withName(String value, String defaultValue) {
        this.setName(value == null ? defaultValue : value);
        return this;
    }

    public String getNumber() {
        return this.number;
    }

    public void setNumber(String value) {
        this.number = value;
    }

    public CouponPadBO withNumber(String value) {
        this.setNumber(value);
        return this;
    }

    public CouponPadBO withNumber(String value, String defaultValue) {
        this.setNumber(value == null ? defaultValue : value);
        return this;
    }

    public String getUsedPhone() {
        return this.usedPhone;
    }

    public void setUsedPhone(String value) {
        this.usedPhone = value;
    }

    public CouponPadBO withUsedPhone(String value) {
        this.setUsedPhone(value);
        return this;
    }

    public CouponPadBO withUsedPhone(String value, String defaultValue) {
        this.setUsedPhone(value == null ? defaultValue : value);
        return this;
    }

    public Object getValueOf(String name) {
        byte var3 = -1;
        switch(name.hashCode()) {
            case -1034364087:
                if (name.equals("number")) {
                    var3 = 2;
                }
                break;
            case -279409622:
                if (name.equals("usedTime")) {
                    var3 = 0;
                }
                break;
            case -75485263:
                if (name.equals("usedPhone")) {
                    var3 = 3;
                }
                break;
            case 3373707:
                if (name.equals("name")) {
                    var3 = 1;
                }
        }

        switch(var3) {
            case 0:
                return this.getUsedTime();
            case 1:
                return this.getName();
            case 2:
                return this.getNumber();
            case 3:
                return this.getUsedPhone();
            default:
                return null;
        }
    }

    public boolean hasField(String name) {
        return FIELD_NAMES.contains(name);
    }

    public int hashCode() {
        return this.signature().hashCode();
    }

    public boolean equals(Object o) {
        return !(o instanceof CouponPadBO) ? false : this.signature().equals(((CouponPadBO)o).signature());
    }

    public String signature() {
        throw new RuntimeException("Bean CouponPadBO has no signature defined, no hash code or equals possible.");
    }
}
